package com.jblog.core.model.account;

import java.sql.Timestamp;

import com.jblog.core.model.BaseModel;
import com.jblog.core.model.common.Role;
import com.jblog.core.model.common.Status;

public class Account extends BaseModel {

    private static final long serialVersionUID = 1L;

    private String name;
    private String pass;
    private String nickName;
    private String email;
    private String photo;
    private String descript;
    private Status status;
    private Role role;
    private String activeCode;
    private Timestamp lastLoginTime;
    private String oldPass;
    
    //--------------------------
    private String captcha;
    private Boolean isCookie = false;

    public Account() {
        super();
    }

    public Account(Long id) {
        super(id);
    }

    public Account(String name) {
        super();
        this.name = name;
    }

    public Account(Long id, Status status) {
        super(id);
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }
    
    public Status getStatus() {
        return status;
    }
    
    public void setStatus(Status status) {
        this.status = status;
    }

	public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Timestamp getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Timestamp lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getActiveCode() {
        return activeCode;
    }

    public void setActiveCode(String activeCode) {
        this.activeCode = activeCode;
    }
    
    public String getOldPass() {
		return oldPass;
	}

	public void setOldPass(String oldPass) {
		this.oldPass = oldPass;
	}

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public Boolean getIsCookie() {
        return isCookie;
    }
    public void setIsCookie(Boolean isCookie) {
        this.isCookie = isCookie;
    }

    @Override
    public String toString() {
        return "Account [name=" + name + ", role=" + role + ", id=" + getId() + "]";
    }
    
}
